package stack;

/**
 * @author ZhengDp
 * @Date 2023/5/12 12:07
 * @Description 栈内存溢出演示 -Xss 256k
 */
public class Stack_Demo3 {
    private static int count;

    public static void main(String[] args) {
        try{
            method1();
        }catch (Exception e) {
            e.printStackTrace();
        } finally {
            System.out.println(count);
        }
    }

    private static void method1(){
        count++;
        method1();
    }
}
